<?php
if (empty($this->page)) {
    $this->page = 'page';
}
if ($this->pageCount > 1):
    ?>
    <script type="text/javascript">
        if(!param){
            var param = new Array();
        }
        param["<?php echo $this->page ?>_key"] = '<?php echo $this->page ?>';
        param["<?php echo $this->page ?>_url"] = '<?php echo $this->url(); ?>';
        param["<?php echo $this->page ?>_container"] = '<?php echo $this->container; ?>';
        param["<?php echo $this->page ?>_isChildDiv"] = <?php echo $this->isChildDiv; ?>;
    <?php if ($this->isPretty) { ?>
                param["<?php echo $this->page ?>_isPretty"] = <?php echo $this->isPretty; ?>;
    <?php } ?>
    </script>
    <div class="pagin">
        <center>
            <ul>

                <!-- First page link -->

                <?php if (isset($this->first) && ($this->first != '1')): ?> 
                    <li>
                        <a href="javascript:void(0)" onclick='batteryObj.paging(<?php echo $this->first ?>, param["<?php echo $this->page ?>_key"], param["<?php echo $this->page ?>_url"], param["<?php echo $this->page ?>_container"], param["<?php echo $this->page ?>_isChildDiv"],  param["<?php echo $this->page ?>_isPretty"])'>
                            First
                        </a>     
                    </li>   
                <?php endif; ?>     


                <!-- Previous page link -->
                <?php if (isset($this->previous)) { ?>
                    <li>
                        <a href="javascript:void(0)" onclick='batteryObj.paging(<?php echo $this->previous ?>, param["<?php echo $this->page ?>_key"], param["<?php echo $this->page ?>_url"], param["<?php echo $this->page ?>_container"], param["<?php echo $this->page ?>_isChildDiv"],  param["<?php echo $this->page ?>_isPretty"])'>
                            &laquo;
                        </a>
                    </li>
                <?php } ?>


                <!-- Numbered page links -->
                <?php foreach ($this->pagesInRange as $page): ?>
                    <?php if ($page != $this->current): ?>
                        <li>
                            <a href="javascript:void(0)" onclick='batteryObj.paging(<?php echo $page ?>, param["<?php echo $this->page ?>_key"], param["<?php echo $this->page ?>_url"], param["<?php echo $this->page ?>_container"], param["<?php echo $this->page ?>_isChildDiv"],  param["<?php echo $this->page ?>_isPretty"])'>
                                <?php echo $page; ?>
                            </a>
                        </li>
                    <?php else: ?>
                        <li class="cur">
                            <a href="javascript:void(0)" onclick='batteryObj.paging(<?php echo $page ?>, param["<?php echo $this->page ?>_key"], param["<?php echo $this->page ?>_url"], param["<?php echo $this->page ?>_container"], param["<?php echo $this->page ?>_isChildDiv"],  param["<?php echo $this->page ?>_isPretty"])'>
                                <?php echo $page; ?>
                            </a>
                        </li>

                    <?php endif; ?>
                <?php endforeach; ?>
                <!-- Next page link -->
                <?php if (isset($this->next)) { ?>
                    <li>
                        <a href="javascript:void(0)" onclick='batteryObj.paging(<?php echo $this->next ?>, param["<?php echo $this->page ?>_key"], param["<?php echo $this->page ?>_url"], param["<?php echo $this->page ?>_container"], param["<?php echo $this->page ?>_isChildDiv"],  param["<?php echo $this->page ?>_isPretty"])'>
                            &raquo;
                        </a>
                    </li>
                <?php } ?>


                <!-- Last page link -->

                <?php if (isset($this->last) && ($this->last != $this->pageCount)): ?>
                    <li>
                        <a href="javascript:void(0)" onclick='batteryObj.paging(<?php echo $this->last ?>, param["<?php echo $this->page ?>_key"], param["<?php echo $this->page ?>_url"], param["<?php echo $this->page ?>_container"], param["<?php echo $this->page ?>_isChildDiv"],  param["<?php echo $this->page ?>_isPretty"])'>
                            Last
                        </a>
                    </li>
                <?php endif; ?>
            </ul>
            <br clear="both" />
        </center>
    </div>
<?php endif; ?>
<br clear="both" />